package com.mz.ozy.adapter;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.bumptech.glide.load.resource.drawable.DrawableTransitionOptions;
import com.jude.rollviewpager.adapter.StaticPagerAdapter;
import com.mz.ozy.R;
import com.mz.ozy.WpkApp;
import com.mz.ozy.bean.GoodsImgBean;
import com.mz.ozy.utils.glideUtils.GlideUtils;

import java.util.List;

import cn.jzvd.JzvdStd;


/**
 *
 */

public class DetailBannerAdapter extends StaticPagerAdapter {

    private final Context context;
    List<String> mBannerListBeans;

    public DetailBannerAdapter(Context context, List<String> mBannerListBeans) {
        this.mBannerListBeans = mBannerListBeans;
        this.context = context;
    }

    @Override
    public View getView(final ViewGroup container, final int position) {
        ImageView view = new ImageView(container.getContext());
        view.setScaleType(ImageView.ScaleType.FIT_XY);
        view.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
        GlideUtils.loadImg(container.getContext(), view, mBannerListBeans.get(position));
        return view;
    }

    @Override
    public int getCount() {
        return mBannerListBeans.size();
    }

}
